package vip.sweet.biz.modular.heritage.service.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import vip.sweet.biz.modular.heritage.entity.BizHeritageProjects;
import vip.sweet.biz.modular.heritage.mapper.BizHeritageProjectsMapper;
import vip.sweet.biz.modular.heritage.params.BizHeritageProjectsAddParams;
import vip.sweet.biz.modular.heritage.service.BizHeritageProjectsService;

/**
 * @author ASUS
 * @Date 2025/10/5 11:23
 * @Descripition
 */
@Service
public class BizHeritageProjectsServiceImpl extends ServiceImpl<BizHeritageProjectsMapper, BizHeritageProjects> implements BizHeritageProjectsService {
    @Override
    public boolean add(BizHeritageProjectsAddParams addHeritageProjectsParams) {
        if (ObjectUtil.isNotEmpty(addHeritageProjectsParams))
            return save(BeanUtil.toBean(addHeritageProjectsParams, BizHeritageProjects.class));
        return false;
    }
}
